-- GENERATED SPELL FOR [Althallen Brightblade] --


function spell0_20388(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20388', 5327, 1)
end

function spell1_20388(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_20388', 609, 1)
end

function spell2_20388(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_20388', 2000, 1)
end

function Sorts_20388(pUnit, Event)
local choix_sorts_20388 = math.random(0, 2)
if choix_sorts_20388 == 0 then
pUnit:RegisterEvent('spell0_20388', 1, 1)
end
if choix_sorts_20388 == 1 then
pUnit:RegisterEvent('spell1_20388', 1, 1)
end
if choix_sorts_20388 == 2 then
pUnit:RegisterEvent('spell2_20388', 1, 1)
end
end

function mob20388_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20388', math.random(1500, 3000), 1)
end

function mob20388_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20388_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20388_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20388, 1, 'mob20388_Action')
RegisterUnitEvent(20388, 2, 'mob20388_Leave')
RegisterUnitEvent(20388, 3, 'mob20388_Kill')
RegisterUnitEvent(20388, 4, 'mob20388_Die')
